package com.example.lib_base_mvvm.baseMVVM.BaseViewModel;

import androidx.lifecycle.ViewModel;

import com.example.lib_base_mvvm.baseMVVM.BaseRepo.BaseRepo;


public abstract class BaseViewModel<Repo extends BaseRepo> extends ViewModel {
    protected Repo repo;

    public BaseViewModel() {
        repo = createRepo();
    }
    //防止抽象方法的目的：每一个页面根据实际需要的repo去创建
    protected abstract Repo createRepo();
}
